package com.huang.controller;

import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;

@Controller
public class hellocontroller {
    @RequestMapping("/h1")
    public String hello(Model model){
        //封装数据
        model.addAttribute("msg","你好 springMVC!");
        return "hello";
    }
    @RequestMapping("/t1")
    public String hello2(Model model){
        //封装数据
        model.addAttribute("msg","hello springMVC11112!");
        return "hello";
    }
}
